home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assembly / cachoffs.lha / .source / cacheoff.asm
Encoding:
Assembly Source File  |  1980-02-07  |  511 b   |  17 lines

  1.  
  2. CACRF_ClearI    =    8    ;Bit for clear instruction cache
  3.  
  4. ;    Supervisor mode only.  Use only if you have taken over the machine.  
  5. ;    Read and store the ExecBase processor AttnFlags flags at boot time, 
  6. ;    call this code only if the "68020 or better" bit was set.
  7.  
  8. ClearICache:    movec    cacr,d0            ;$4e7a0002
  9.         tst.w    d0            ;zflag set?
  10.         bmi.s    cic_040            ;a MC68040 with enable cache!
  11.         ori.w    #CACRF_ClearI,d0    ;clear cache lines
  12.         movec    d0,cacr            ;setup cache
  13.         bra.s    cic_exit
  14. cic_040:    dc.w    $f4b8            ;cpusha (ic)
  15. cic_exit:    rts
  16.  
  17.